import {Component} from "@angular/core";
import {FaqService} from "./service/faq.service";
import {Faq} from "./entity/faq";
/**
 * Created by Administrator on 2016/8/2.
 */
@Component({
    selector:"my-body",
    templateUrl:"./app/body.html",
    providers:[FaqService]
})
export class BodyComponent{

    private faqService:FaqService;
    
    private faqList:Faq[];
    
    constructor(faqService:FaqService){
        this.faqService = faqService;
        faqService.findAll().subscribe(result=>this.faqList = result.json());
    }
    
}